import request from '@/router/axios';

export const getList = (current, size, params) => {
  return request({
    url: '/api/patrolShiftTaskSettings/shifttasksettings/page',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}

export const getDetail = (id) => {
  return request({
    url: '/api/patrolShiftTaskSettings/shifttasksettings/detail',
    method: 'get',
    params: {
      id
    }
  })
}

export const remove = (ids) => {
  return request({
    url: '/api/patrolShiftTaskSettings/shifttasksettings/remove',
    method: 'post',
    params: {
      ids,
    }
  })
}

export const add = (row) => {
  return request({
    url: '/api/patrolShiftTaskSettings/shifttasksettings/save',
    method: 'post',
    data: row
  })
}

export const update = (row) => {
  return request({
    url: '/api/patrolShiftTaskSettings/shifttasksettings/update',
    method: 'post',
    data: row
  })
}
export const getXjdList = (current, size, params) => {
  return request({
    url: '/api/patrolPointCustomSettings/pointcustomsettings/page',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}
export const getTimeWeek = () => {
  return request({
    url: '/api/blade-system/dict-biz/dictionary?code=renWuTime',
    method: 'get'
  })
}
export const getTimeMonth = () => {
  return request({
    url: '/api/blade-system/dict-biz/dictionary?code=renWuTimeMonth',
    method: 'get'
  })
}
export const getTimeYear = () => {
  return request({
    url: '/api/blade-system/dict-biz/dictionary?code=getTimeYear',
    method: 'get'
  })
}
export const getFzrLinkInfo = (fzr) => {
  return request({
    url: '/api/prodUnitManage/bladeProdUnit/getFzrLinkInfo',
    method: 'get',
    params: {
      fzr
    }
  })
}
export const getName = (xm) => {
  return request({
    url: '/api/prodUnitManage/bladeProdUnit/getFzrList',
    method: 'get',
    params: {
      xm
    }
  })
}
